
package Data;
import java.rmi.RemoteException;

/**
 *
 * @author Philipp Armbruster
 */

public class PassengerImpl
    extends java.rmi.server.UnicastRemoteObject
    implements Passenger {

    /* Kundennummer */

        private int passengerId;

    /* Vorname */

        private String firstName;

    /* Nachname */

        private String lastName;

    /* Straßenbezeichnung */

        private String street;

    /* Postleitzahl */

        private int postcode;

    /* Wohnort */

        private String city;



    /* Konstruktor - Klasse Passagier - */

        public PassengerImpl(String firstName, String lastName, String street, int postcode, String city)
                throws java.rmi.RemoteException {

            this.firstName = firstName;
            this.lastName = lastName;
            this.street = street;
            this.postcode = postcode;
            this.city = city;
        }



    /* Set-Methoden */

        /**
        * Setzen einer Kundennummer.
        * @param passengerId (Kundennummer)
        * @throws java.rmi.RemoteException
        */
    
        public void setPassengerId(int passengerId) throws java.rmi.RemoteException {
            this.passengerId = passengerId;
        }

        /**
        * Setzen eines Vornamens.
        * @param firstName (Vorname)
        * @throws java.rmi.RemoteException
        */

        public void setFirstName(String firstName) throws java.rmi.RemoteException {
            this.firstName = firstName;
        }

        /**
        * Setzen eines Nachnamens.
        * @param lastName (Nachnamen)
        * @throws java.rmi.RemoteException
        */

        public void setLastName(String lastName) throws java.rmi.RemoteException {
            this.lastName = lastName;
        }

        /**
        * Setzen einer Straßenanschrift.
        * @param street (Straßenanschrift)
        * @throws java.rmi.RemoteException
        */

        public void setStreet(String street) throws java.rmi.RemoteException {
            this.street = street;
        }

        /**
        * Setzen einer Postleitzahl.
        * @param postcode (Postleitzahl)
        * @throws java.rmi.RemoteException
        */

        public void setPostcode(int postcode) throws java.rmi.RemoteException {
            this.postcode = postcode;
        }

        /**
        * Setzen eines Wohnortes.
        * @param city (Wohnort)
        * @throws java.rmi.RemoteException
        */

        public void setCity(String city) throws java.rmi.RemoteException {
            this.city = city;
        }

        

    /* Get-Methoden */

        /**
        * Auslesen der Kundennummer.
        * @return Kundennummer
        * @throws java.rmi.RemoteException
        */

        public int getPassengerId() throws java.rmi.RemoteException {
            return this.passengerId;
        }

        /**
        * Auslesen des Vornamens.
        * @return Vorname
        * @throws java.rmi.RemoteException
        */

        public String getFirstName() throws java.rmi.RemoteException {
            return this.firstName;
        }

        /**
        * Auslesen des Nachnamens.
        * @return Nachname
        * @throws java.rmi.RemoteException
        */

        public String getLastName() throws java.rmi.RemoteException {
            return this.lastName;
        }

        /**
        * Auslesen der Straßenanschrift.
        * @return Straßenanschrift
        * @throws java.rmi.RemoteException
        */

        public String getStreet() throws java.rmi.RemoteException {
            return this.street;
        }

        /**
        * Auslesen der Postleitzahl.
        * @return Postleitzahl
        * @throws java.rmi.RemoteException
        */

        public int getPostcode() throws java.rmi.RemoteException {
            return this.postcode;
        }

        /**
        * Auslesen des Wohnortes.
        * @return Wohnort
        * @throws java.rmi.RemoteException
        */

        public String getCity() throws java.rmi.RemoteException {
            return this.city;
        }
}
